package section14;

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;

public class App14_3 extends Application {
    @Override
    public void start(Stage primaryStage) {
        StackPane sPanes = new StackPane();

        Button bt = new Button("button");
        Button bt1 = new Button("确定");
        bt.setPrefSize(80, 50);
        bt.setStyle("-fx_border_color:green");
        bt.setRotate(-45);

        sPanes.getChildren().addAll(bt, bt1);//将两个按钮放入栈面板


        sPanes.setRotate(0);//此方法控制栈面板的旋转度
        sPanes.setStyle("-fx-border-color:red;-fx-background-color:lightgray");
        Scene scene = new Scene(sPanes, 200, 115);
        primaryStage.setTitle("栈面板");
        primaryStage.setScene(scene);
        primaryStage.show();
    }
}
